/*
 * Decompiled with CFR 0.150.
 * 
 * Could not load the following classes:
 *  cn.hutool.core.util.ObjectUtil
 *  de.felixroske.jfxsupport.FXMLController
 *  javafx.fxml.FXML
 *  javafx.scene.layout.AnchorPane
 *  org.springframework.beans.factory.annotation.Autowired
 */
package com.gys.controller.index;

import cn.hutool.core.util.ObjectUtil;
import com.gys.GysApplication;
import com.gys.common.util.CacheUtil;
import com.gys.controller.BaseController;
import com.gys.controller.LoginController;
import com.gys.controller.index.IndexController;
import com.gys.view.LoginView;
import de.felixroske.jfxsupport.FXMLController;
import javafx.fxml.FXML;
import javafx.scene.layout.AnchorPane;
import org.springframework.beans.factory.annotation.Autowired;

@FXMLController
public class ChangeTipController
extends BaseController {
    @FXML
    private AnchorPane pane;
    @Autowired
    private IndexController indexController;
    @Autowired
    private LoginController loginController;

    @FXML
    void sureAction() {
        this.cancelAction();
        this.indexController.timer.cancel();
        if (ObjectUtil.isNotEmpty(IndexController.stage)) {
            IndexController.stage.close();
        }
        CacheUtil.getCacheManager().getCache("sysCache").flush();
        this.loginController.init();
        GysApplication.showView(LoginView.class);
    }

    @FXML
    void cancelAction() {
        this.pane.getScene().getWindow().hide();
    }
}

